Suppose
and
are alphabets (not
necessarily distinct). Then a homomorphism h is a function from
to
*.
If w is a string in
, then we define h(w) to
be the string obtained by replacing each symbol x
by the corresponding
string h(x)
*.
If L is a language on
, then its homomorphic
image is a language on
. Formally,
L}Theorem. If L is a regular language on
, then its homomorphic
image h(L) is a regular language on
. That is, if you
replaced every string w in L with h(w), the resultant set of strings would be a
regular language on
.
Proof.
with h(x)
.
. The result is an nfa
that recognizes exactly the language h(L).